public class Main {
    public static void main(String[] args) {
       ResourceFactory factory = new ResourceFactory();
        Resource resourceA = factory.getResource("资源A");
        Resource resourceB = factory.getResource("资源B");

        System.out.println(resourceA.display() + " | 哈希码: " + resourceA.hashCode());
        System.out.println(resourceB.display() + " | 哈希码: " + resourceB.hashCode());

        resourceA = factory.getResource("资源A");
        System.out.println(resourceA.display() + " | 哈希码: " + resourceA.hashCode());
        }
}